<template>
  <view>
    <!-- isolateUser==true为入境人员扫疫点通码进来，fromAbroad==true为登陆页点击我是入境人员进来。-->
    <view class="fromAbroad" v-if="fromAbroad=='1' || isolateUser">
      <view class="fromAbroad-title">请扫一码通二维码</view>
      <view class="fromAbroad-qrcode" >
        <view class="fromAbroad-syis-img" @click="scan">
          <image
                class="fromAbroad-imageIcon"
                src="../../../static/index/icon-sacn.png"
                mode="widthFix"
              ></image>
        </view>
      </view>
      <view class="fromAbroad-tip-box">
        <image class="icon-care" src="../../../static/index/icon-care.png" mode="widthFix"></image>
        代他人填请扫他人一码通二维码
      </view>
    </view>

    <view class="myform" :class="{'addPadding':addPadFlag}"  v-else>
      <uni-forms
        :value="formData"
        :rules="rules"
        ref="form"
        validate-trigger="bind"
        err-show-type="undertext"
      >
        
        <uni-group top="0">
          <view class="pageTitle">基本信息</view>
          <view class="qrcode" v-if="personClassify && personClassify!=7" >
            <view>
              <text class="txt">请扫一码通二维码</text>
              <view class="is-code">{{formData.daSourceId}}</view>
            </view>
            <view class="syis-img" @click="scan">
              <image
                    class="imageIcon"
                    src="https://szgd-dev.tgovcloud.com/public/images/checkin/saoyisao.png"
                    mode="widthFix"
                  ></image>
            </view>
          </view>
        <view v-if="tipMsg" class="tip-box" :class="{'tipBorderTop':personClassify && personClassify!=7}"  >{{tipMsg}}</view>
          <uni-forms-item name="name" label="姓名" class="form-item">
            <view class="form-title">姓名</view>
            <uni-easyinput
              type="text"
              class="rightAlign"
              placeholderStyle="font-size:34rpx;font-family: PingFang SC;color: #666666;"
              v-model="formData.name"
              placeholder="请输入姓名"
            ></uni-easyinput>
          </uni-forms-item>

          <uni-forms-item name="cardType" label="证件类型" class="form-item">
            <view class="form-title">证件类型</view>
            <picker
              :value="formData.cardType"
              :range="identityTypeList"
              range-key="label"
              @change="binddata('type', $event.detail.value)"
              v-if='isCHN == false'
            >
              <view class="picker-text-x">{{
                showDicLabel(formData.cardType, identityTypeList)
              }}</view>
            </picker>
            <view class='picker-text-x' v-if='isCHN'>身份证</view>
          </uni-forms-item>

          <uni-forms-item name="cardId" label="证件号码" class="form-item">
            <view class="form-title">证件号码</view>
            <uni-easyinput
              :type="formData.cardType==0?'idcard':'text'"
              v-model="formData.cardId"
              placeholderStyle="font-size:34rpx;font-family: PingFang SC;color: #666666;"
              class="rightAlign"
              placeholder="请输入证件号码"
              v-if='isCHN == false'
            ></uni-easyinput>
            <uni-easyinput
              type="idcard"
              v-model="formData.cid"
              placeholderStyle="font-size:34rpx;font-family: PingFang SC;color: #666666;"
              class="rightAlign"
              placeholder="请输入证件号码"
              v-if='isCHN'
            ></uni-easyinput>
          </uni-forms-item>

          <uni-forms-item
            name="telPhone"
            label="电话号码"
            :class="{'isNoBtmborder':(personClassify && personClassify!=7)}"
            class="form-item "
          >
            <view class="form-title">手机号码</view>

            <uni-easyinput
              type="number"
              class="rightAlign "
              v-model="formData.telPhone"
              placeholderStyle="font-size:34rpx;font-family: PingFang SC;color: #666666;"
              placeholder="请输入手机号码"
            ></uni-easyinput>
          </uni-forms-item>

          <view class="divi-bar" v-if="personClassify && personClassify!=7" ></view>
          <view class="tips" v-if="false">请联系工作人员确定隔离点</view>

          <view class="search-row" v-if="false">
            <view class="left-side">
              <picker
                @change="setAddr"
                :value="addrAreaVal"
                :range="addrAreaArr"
                range-key="label"
                class="popup-control-con-picker"
              >
                <view style="display: inline-block" class="addr-select">
                  {{ showDicLabel(formData.addrAreaVal, addrAreaArr) }}
                </view>
                <view style="display: inline-block; float: right">
                  <image
                    class="imageIcon"
                    src="https://szgd-dev.tgovcloud.com/public/images/checkin/arrow-down.png"
                    mode="widthFix"
                  ></image>
                </view>
              </picker>
            </view>
            <view class="right-side">
              <view style="float: left;margin-left:6px;">
                <image
                  class="imageIcon"
                  src="https://szgd-dev.tgovcloud.com/public/images/checkin/icon-search.png"
                  mode="widthFix"
                ></image>
              </view>
              <input
                @input="inputTxtChange"
                @focus="inputTxtFocus"
                @blur="addPadFlag=false"
                @confirm.prevent="inputTxtChange"
                confirm-type="search"
               v-model="formData.hotelBaseInfoName" class="search-input" placeholder="可搜索详细地址" />
            </view>

            <view class="search-reslist" v-show="searchPanel">
              <view  v-if="suggestList.length>0">
              <view v-for="(item) in suggestList"  class="item-hotel"
                @click="selectHotel(item)"
               :key="item.hotelBaseInfoId" >
                {{item.hotelName}}
              </view></view>
              <view v-else  class="nodata item-hotel" >暂无数据</view>
            </view>
            <view
                @click="searchPanel=false"
                class="fade-mask"
                v-show="searchPanel"
            ></view>
          </view>

        </uni-group>


        <view class="example">
          <button class="submit" @click="submitForm">下一步</button>
        </view>
      </uni-forms>
    </view>
    <view>
      <!-- 普通弹窗 -->
      <uni-popup
        @touchmove.stop.prevent="clear"
        ref="popup"
        background-color="#fff"
        type="top"
      >
        <view class="popup-content">
          <room-dialog
            :roomList="roomList"
            :houseId.sync="formData.houseId"
            v-model="formData.roomNum"
            @onClose="onDialogClose"
          ></room-dialog>
        </view>
      </uni-popup>
    </view>
  </view>
</template>

<script>
import { getData, userCheck, getDic } from "@/api/index";
import { getDicByType, scanOneYardPass, throttle } from "@/utils";
import { login } from '@/api/login.js'
export default {
  data() {
    return {
      formData: {
        codeId: "",
        name: "", //姓名
        cardType: "0", //证件类型
        cardId: "", //证件号码
        telPhone: '', //电话号码
        type: "入境人员", //人员类型
        moveDay: "14", //隔离天数
        houseId: "", //房间选择
        moveStartTime: "", //入住时间
        remark: "", //备注
        roomNum: "",
        addrAreaVal: '',
        daSourceId: "", // CHN-C81683114
        hotelBaseInfoName: '',
        hotelBaseInfoId: '',
      },
      tipMsg: "",
      searchPanel: false,
      addPadFlag: false,
      roomCheck: 102,
      identityTypeList: [
        // {value:1, label:"居民身份证"},
        // {value:2, label:"临时居民身份证"},
        // {value:3, label:"军官证"},
        // {value:4, label:"港澳居民往来内地通行证"},
        // {value:5, label:"台湾居民来往大陆通行证"},
        // {value:6, label:"护照"},
        // {value:7, label:"其他"},
        // {value:8, label:"港澳居民居住证"},
        // {value:9, label:"台湾居民居住证"},
      ],
      dictionaries: {
        1: '0',
        2: '0',
        3: '88',
        4: '55',
        5: '66',
        6: '1',
        7: '9',
        8: '89',
        9: '90',
      },
      addrAreaVal: 0,
      addrAreaArr: [],
      show: false,
      rules: {
        name: {
          rules: [
            {
              required: true,
              errorMessage: "请录入姓名"
            }
          ]
        },
        cardType: {
          rules: [
            {
              required: true,
              errorMessage: "请录入证件类型"
            }
          ]
        },
        cardId: {
          rules: [
            {
              required: true,
              errorMessage: "请录入证件号码"
            }
          ]
        },
        telPhone: {
          rules: [
            {
              required: true,
              errorMessage: "请录入手机号码"
            },{
              pattern: '^1[0-9]{10}$',
              errorMessage: "手机号码格式不正确"
				    }
          ]
        },
        daSourceId: {
          rules: [
            {
              required: true,
              errorMessage: "请录入姓名"
            }
          ]
        }
      },
      roomList: [],
      QRCodeType: "", //二维码类型
      personKey: "", // 二维码值
      personKeyVal: "",
      personClassify: '',
      suggestList: [],
      personTypeIndex:0,
      personTypeList:[],
      personInfo: {},
      isolationId:'',
      isolateUser: false,
      isCHN:false,
      fromAbroad: 0,
    };
  },
  onUnload() {
    this.$store.commit("SET_AUTH_STATUS", false);
  },
   async onLoad(ev) {
     // 扫码获取场景值
    this.fromAbroad = ev.fromAbroad;
    this.personClassify=ev.personClassify
    const scene = decodeURIComponent(ev.scene)
    console.log('v参数：',ev);
    if(scene == 'isolateUser'){
      this.isolateUser = true;
      this.personClassify = '7'
      this.tipMsg='请扫一码通二维码，代他人填报需扫他人一码通二维码'
      uni.hideHomeButton()
    }
    await login('19988886666');
    
    this.generateTip(ev);

    let personTypeList = await this.$store.dispatch('getDic','person_classify');
    this.getTree();
    this.identityTypeList = await this.$store.dispatch('getDic','card_type')
    this.personTypeList = personTypeList.sort((a,b)=>a.sort-b.sort)
    
    let shenAiNin = uni.getStorageSync('shenAiNin');
    this.formData.telPhone = shenAiNin.mobileNum || uni.getStorageSync('telPhone');
    this.formData.name = shenAiNin.name || '';
    this.formData.cardId = shenAiNin.idNum || ''
    this.formData.cardType = this.dictionaries[shenAiNin.idType] || '0'
    // 清除选题
    uni.removeStorageSync('dataIsi');
    uni.removeStorageSync('dataPhq9');
    uni.removeStorageSync('dataGad7');
    uni.removeStorageSync('health');

    // 清除是否入境人员缓存
    uni.removeStorageSync('isFromAbroad');
  },
  onReady() {},
  methods: {
    binddata(value, value2) {
      console.log(value, value2);
      this.formData.cardType = this.identityTypeList[value2].value;
    },
    changePersonType(e){
      this.personTypeIndex = e.target.value;
    },
    showDicLabel(curVal, arr) {
      let txt = "";
      arr.map(ele => {
        if (ele.value == curVal) {
          txt = ele.label;
        }
      });
      // console.log("curVal", curVal);
      // console.log("curVal", arr);
      // console.log("字体", txt);
      return txt;
    },

    setAddr(ev) {
      console.log('设置的值', ev.detail.value)
      let key = ev.detail.value;
      this.formData.addrAreaVal = this.addrAreaArr[key].value;
      this.addrAreaVal = key;
      console.log('this.formData.addrAreaVal', this.formData.addrAreaVal)
      this.searchPanel=false;
      this.formData.hotelBaseInfoName='';
      this.formData.hotelBaseInfoId='';
    },

    getTree() {
      getData("divisionTree", "get", {}).then(arr => {
        // console.log(res, '结果=====')
        arr.forEach(ele => {
          ele.label = ele.divisionName;
          ele.value = ele.divisionCode;
        });
        this.addrAreaArr = arr;
        if(arr.length>0) {
          let obj=arr[0];
          this.formData.addrAreaVal=obj.divisionCode;
        }
      });
    },

    inputTxtChange: throttle( function(ev){
      let str=ev.detail.value;
      console.log('getAddrTips====', str);
      // this.addrTipsFlag=true;
      str=str||''
      this.searchHotel(str);
    }, 500) ,

    inputTxtFocus(){
      this.searchHotel('');
      this.moveTop()
      this.addPadFlag=true;
    },

    moveTop(){
      setTimeout(() => {
        uni.pageScrollTo({
          scrollTop: 350
        })
      }, 200);
    },

    searchHotel(str){
      getData('toolsHotel', 'get', {
        belongId: this.formData.addrAreaVal
      }).then((res)=>{
        console.log('查询结果===', res)
        this.searchPanel=true;
        let arr = res.filter((item)=>{
          return item.hotelName.indexOf(str)!=-1;
        })
        this.suggestList=arr;
      })
    },

    scan() {
      // wx.scanCode({
      //   success: async res => {
      //     let result = res.result;
      //     console.log("扫码结果===", result);
      //     this.formData.daSourceId = result;
      //   }
      // });

      scanOneYardPass({
        fn: (result)=>{
          this.formData = {
            ...this.formData,
            ...result.personInfo,
            cardType: result.personInfo.cardType || 0,
            daSourceId: result.daSourceId, 
            telPhone: result.personInfo.phoneEncode,
            cardId: result.personInfo.cardNumber
          };
          let daSourceId = (result.daSourceId || '').substr(0,3);
          daSourceId == 'CHN' && (this.isCHN = true)
          console.log('扫码数据:',this.formData);
          
          // 一码通用户，扫码完直接手动触发提交，不校验身份证
          this.submitForm();
        }
      })
    },

    selectHotel(row){
      console.log(row)
      this.formData.hotelBaseInfoName=row.hotelName;
      this.formData.hotelBaseInfoId=row.hotelBaseInfoId;
      this.searchPanel=false;
    },

     async submitForm() {
      let obj=this.formData;
      
      if (this.fromAbroad=='1' || this.isolateUser) {
        let params={
          "cardId": this.formData.cardId,
          "cardType": this.formData.cardType,
          "name": this.formData.name,
          "telPhone": this.formData.telPhone,
          "daSource": this.formData.daSourceId?'03':'02',  // 一码通03
          "daSourceId": this.formData.daSourceId,
          // "hotelBaseInfoId": this.formData.hotelBaseInfoId,
          "personClassify": this.personClassify,
          "cid": this.formData.cid
        }
        this.sendAjax(params);
      }else{
        this.$refs.form.validate().then(res => {
          console.log("提交===", res);
          if(res.cardType==0){
            let jmsfz = /^([\u4e00-\u9fa5]{1,20}|[a-zA-Z ]{1,20})$/;
            // if (!res.cardId) {
            if (!jmsfz.test(res.name)) {
              uni.showToast({
                icon: "none",
                title: "姓名不能含有数字、符号",
              });
              return
            }
          }
          if(this.isCHN){
            let jmsfz = /(^\d{8}(0\d|10|11|12)([0-2]\d|30|31)\d{3}$)|(^\d{6}(18|19|20)\d{2}(0\d|10|11|12)([0-2]\d|30|31)\d{3}(\d|X|x)$)/;
            // if (!res.cardId) {
            if (!jmsfz.test(this.formData.cid)) {
              uni.showToast({
                icon: "none",
                title: "身份证号码格式不正确",
              });
              return
            }
          }
          if(res.cardType==0) {
            let jmsfz = /(^\d{8}(0\d|10|11|12)([0-2]\d|30|31)\d{3}$)|(^\d{6}(18|19|20)\d{2}(0\d|10|11|12)([0-2]\d|30|31)\d{3}(\d|X|x)$)/;
            // if (!res.cardId) {
            if (!jmsfz.test(res.cardId)) {
              uni.showToast({
                icon: "none",
                title: "身份证号码格式不正确",
              });
              return
            }
          }
          // if(!this.formData.hotelBaseInfoId){
          //     uni.showToast({
          //       icon: "none",
          //       title: "请先选择隔离点",
          //     });
          //     return
          //   }
          if(this.personClassify!=7 && !this.formData.daSourceId){
            uni.showToast({
              icon: "none",
              title: "请先扫二维码",
            });
            return
          }
          let params={
            "cardId": this.formData.cardId,
            "cardType": this.formData.cardType,
            "name": this.formData.name,
            "telPhone": this.formData.telPhone,
            "daSource": this.formData.daSourceId?'03':'02',  // 一码通03
            "daSourceId": this.formData.daSourceId,
            // "hotelBaseInfoId": this.formData.hotelBaseInfoId,
            "personClassify": this.personClassify,
            "cid": this.formData.cid
          }
          this.sendAjax(params);
        });
      }
    },

    sendAjax(params){

      // 7月22日变更：基本信息页面，不调接口提交基本信息了，传到自主填报页面填写

      uni.setStorage({ key: 'dataFromUserBaseInfo', data: params});
      let params2={};
        // params2.daSource = '03';
        // params2.daSourceId = this.formData.daSourceId;
        params2.name = params.name;
        params2.cardId = params.cardId;
        params2.cardType = params.cardType;
        userCheck({phone:params.telPhone}).then((res) => {
          console.log("是否是隔离人员："+res.isolateUser)
          console.log("是否是管理员："+res.systemUser)
          uni.setStorage({key:'reportType',data:res})
        })
        setTimeout(async()=>{
          let data = await getData('getPersonInfo', 'get', { ...params2 });
          console.log('得到的data===', data);
          uni.setStorage({ key: 'personInfo', data: data.length>0? data[0] :{}});
          uni.setStorage({key:'telPhone', data:params.telPhone})

          // 是否入境人员
          uni.setStorage({key:'isFromAbroad', data: this.fromAbroad=='1' || this.isolateUser ? '1':'0'});
          if(this.isolateUser){
            uni.navigateTo({
              url:'/packageIsolate/pages/isolateUser/index'
            })
          }else{
            uni.redirectTo({
              url:'/packageIsolate/pages/isolateUser/index'
            });
          }
        }, 300)


      return ;
      // 不在这个页面调用接口了
      // getData('addToolPerson', 'POST', params).then(async(res)=>{
      //   let params2={};
      //   params2.daSource = '03';
      //   params2.daSourceId = this.formData.daSourceId;
      //   params2.name = params.name;
        // params2.cardId = this.formData.daSourceId;
      //   params2.cardId = params.cardId;
      //   params2.cardType = params.cardType;
      //   userCheck({phone:params.telPhone}).then((res) => {
      //     console.log("是否是隔离人员："+res.isolateUser)
      //     console.log("是否是管理员："+res.systemUser)
      //     uni.setStorage({key:'reportType',data:res})
      //   })
      //   setTimeout(async()=>{

      //     let data = await getData('getPersonInfo', 'get', { ...params2 });
      //     console.log('得到的data===', data);
      //     uni.setStorage({ key: 'personInfo', data: data.length>0? data[0] :{}});
      //     uni.setStorage({key:'telPhone', data:params.telPhone})
      //     uni.redirectTo({
      //       url:'/packageIsolate/pages/isolateUser/index'
      //     });
      //   }, 300)
      // })
    },

    generateTip(ev){
      if(ev.personClassify==1){
        // 入境
        this.tipMsg='请扫一码通二维码，代他人填报需扫他人一码通二维码'
      }else if(ev.personClassify==7){
        // 非入境
        this.tipMsg='代他人填报需输入他人的基本信息'
      }
    },

  },
  components: {},
  watch: {
    searchPanel(newVal){
      if(newVal==false) this.addPadFlag=false;
    }
  }
};
</script>

<style lang="scss" rel="stylesheet/scss">
//
.fromAbroad{
  padding-top: 270rpx;
  text-align: center;
  .fromAbroad-title{
    font-size: 40rpx;
    color: rgba(102, 102, 102, 1);
    padding-bottom: 44rpx;
  }
  .fromAbroad-qrcode{
    .fromAbroad-imageIcon{
      width: 232rpx;
      height: 232rpx;
    }
  }
  .fromAbroad-tip-box{
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 38rpx;
    font-size: 26rpx;
    color: rgba(241, 91, 83, 1);
    .icon-care{
      width: 28rpx;
      height: 28rpx;
      margin-right: 10rpx;
    }
  }
}
.person-key {
  font-size: 34rpx;
}
.checkRoorm {
  pointer-event: none;
  .img {
    pointer-event: auto;
  }
  p {
    font-size: 34rpx;
    line-height: 60rpx;
    color: #000000;
    &.noValue {
      color: #ccc;
    }
  }
  // .uni-easyinput {
  //   font-size: 34rpx;
  //   color: #000000;
  //   font-
  .picker-text {
    font-size: 34rpx;
    font-family: PingFang SC;
    font-weight: 300;
    line-height: 48px;
    color: #666666;
    opacity: 1;
  }
  .geli {
    position: relative;
    .tian {
      position: absolute;
      left: 20rpx;
      top: 50rpx;
      transform: translateY(-50%);
    }
  }
}
.picker-control {
  padding: 20rpx 40rpx;
  box-sizing: border-box;
  align-items: center;
  color: #333333;

  &-title {
    font-weight: 500;
    font-size: 26rpx;
  }

  &-con {
    &-picker {
      margin-top: 20rpx;
      padding: 10rpx 20rpx;
      text-align: left;
      border: 1px solid #f2f2f2;
      border-radius: 8rpx;

      &-date {
        border-left: 0;
        border-right: 0;
        border-top: 0;
        border-bottom: 1px solid #f2f2f2;

        .uni-input {
          line-height: 80rpx;
        }
      }

      .uni-input {
        width: 90%;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        font-size: 26rpx;
      }
    }
  }
}
.form-item {
  position: relative;
  /deep/ .uni-forms-item__inner {
    margin: 0;
    padding-bottom: 0 !important;
  }
  /deep/ .uni-forms-item__content {
    height: 140rpx;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
}
.myform {
  min-height: calc(100vh - 50rpx);
  background-color: #f9f9f9;
  /deep/ .uni-forms-item__label {
    display: none !important;
  }
  .rightAlign {
    // float: right;
    /deep/ .uni-easyinput__content-input {
      text-align: right;
    }
    /deep/ .uni-easyinput {
      width: 80vw;
    }
  }
}
.cl {
    color: red;
  }
.picker-text-x {
  font-size: 34rpx;
  font-family: PingFang SC;
  font-weight: 400;
  line-height: 48px;
  color: #666666;
  opacity: 1;
}
.pageTitle {
  font-size: 40rpx;
  font-family: PingFang SC;
  font-weight: 400;
  line-height: 24px;
  color: #000000;
  opacity: 1;
  background-color: #fff;
  // padding: 10rpx 32rpx;
}
.form-title {
  position: absolute;
  left: 0;

  font-size: 30rpx;
  color: #999999;
}
.gelidian {
  height: 38px;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid #eaeaea;
  /deep/ .uni-forms-item__label {
    display: none !important;
  }
}
.hotel-search {
  /deep/ .uni-forms-item__label {
    display: none !important;
  }
  /deep/ .is-input-border {
  }
}
.imageIcon {
  display: inline-block;
  width: 44rpx;
  height: 44rpx;
  margin-top: 2px;
  margin-right: 6px;
}
.ewm-input {
  /deep/ .uni-easyinput {
    width: 80% !important;
  }
}
.sysBtn {
  border: 1px solid #eaeaea;
  display: inline-block;
  position: absolute;
  right: 0;
  // top: 50%;
  // transform: translateY(-50%);
  bottom: 10px;
}
.addr-select {
  // height: 38px;
  // line-height: 38px;
  font-size: 26rpx;
  font-family: PingFang SC;
  font-weight: 500;
  line-height: 37rpx;
  color: #000000;
  opacity: 1;
  display: flex;
  align-items: center;
}
.divi-bar {
  height: 32rpx;
  background: #F9F9F9;
  width: 200vw;
  transform: translateX(-50px);
}
.isNoBtmborder {
  /deep/ .uni-forms-item__inner {
    border-bottom: none !important;
  }
}
.tips {
  height: 98rpx;
  background: #ffffff;
  opacity: 1;
  font-size: 30rpx;
  font-family: PingFang SC;
  font-weight: 400;
  color: #2c9af1;
  opacity: 1;
  display: flex;
  align-items: center;
  width: 100vw;
  border-bottom: 1rpx solid #e5e5e5;
  transform: translateX(-15px);
  padding-left: 15px;
}
.search-row {
  display: flex;
  padding: 30rpx 0;
  position: relative;
  .left-side {
    height: 56rpx;
    width: 240rpx;
    padding-left: 30rpx;
    border: 1px solid #999999;
    border-radius: 60rpx;
    position: relative;
    z-index: 10;
  }
  .right-side {
    border-radius: 60rpx;
    border: 1px solid #999999;
    z-index: 10;
    flex: 1;
    position: relative;
    margin-left: 4rpx;
    .search-input {
      height: 100% !important;
      font-size: 26rpx;
      font-family: PingFang SC;
      font-weight: 400;
      opacity: 1;
      &::-webkit-input-placeholder {
      color: #cccccc;
      }
    }
  }
}
.search-reslist {
  position: absolute;
  top: 100rpx;
  max-height: 40vh;
  border: 1rpx solid #f2f2f2;
  overflow-y: auto;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  width:86vw;
  border-radius: 10rpx;
  padding: 0 32rpx;
  background: #fff;
  .item-hotel {
    border-bottom: 1rpx solid #f2f2f2;
    padding: 12rpx 0;
    font-size: 26rpx;
    &:last-child {
      border-bottom: none;
    }
  }
}
.fade-mask {
  position: fixed;
  left: 0;
  top: 0;
  right:0;
  bottom: 0;
  z-index: 2;
  // background-color: green;
}
.qrcode {
  padding-top: 30rpx;
  display: flex;
  height: 160rpx;
  align-items: center;
  justify-content: space-between;
  .txt {
    font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
line-height: 42rpx;
color: #666666;
opacity: 1;
margin-bottom: 20rpx;
display: inline-block;
  }
  .is-code {
    font-size: 34rpx;
font-family: PingFang SC;
font-weight: 500;
line-height: 48rpx;
color: #000000;
opacity: 1;
  }
}
.syis-img {
  .imageIcon {
    width: 118rpx;
    height: 118rpx;
  }
}
.nodata {
  color: #999999;
}
.addPadding {
  padding-bottom: 350px;
}
.tip-box {
  padding: 30rpx 0 10rpx ;
  font-size: 24rpx;
  // width: 520px;
  // height: 37px;
  font-size: 26rpx;
  font-family: PingFang SC;
  font-weight: 400;
  color: #FF6010;
  opacity: 1;
}
.tipBorderTop {
  border-top: 1px solid #E5E5E5;
}
</style>
